<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>twohome.net</title>
<link href="./theme/default/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src='public/js/lib/jquery-1.7.1.js'></script>


<script type="text/javascript">  
function inputTipText(){   
$("input[class*=grayTips]") //所有样式名中含有grayTips的input  
.each(function(){  
   var oldVal=$(this).val();   //默认的提示性文本  
   $(this)  
   .css({"color":"#888"})  //灰色  
   .focus(function(){  
    if($(this).val()!=oldVal){$(this).css({"color":"#000"})}else{$(this).val("").css({"color":"#888"})}  
   })  
   .blur(function(){  
    if($(this).val()==""){$(this).val(oldVal).css({"color":"#888"})}  
   })  
   .keydown(function(){$(this).css({"color":"#000"})})  
    
})  
}  
$(function(){  
inputTipText();  //直接调用就OK了

cc=$('#login-all');
dd=$('#reg-all');
dd.css({'top':cc.offset().top-50,'left':(document.documentElement.clientWidth-dd.width())/2})
$('#switchReg').click(function(){
	$('#login-all').fadeOut('slow');
	$('#reg-all').fadeIn('slow');
});
$('#switchLog').click(function(){
	$('#reg-all').fadeOut('slow');
	$('#login-all').fadeIn('slow');
});

$('#login-form').submit(function(){
	email_pattern = /\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/
	if(!email_pattern.test($('#login-account').val()))
	{
		alert("邮箱格式错误！请重新输入~");
		$('#login-account').addClass('red-edit-box');
		return false;
	}
	if($('#login-password').val()=="")
	{
		alert("请输入密码~");
		$('#login-password').addClass('red-edit-box');
		return false;
	}
});

$('#reg-form').submit(function(){
	email_pattern = /\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/

	if(!email_pattern.test($('#reg-account').val()))
	{
		alert("邮箱格式错误！请重新输入~");
		$('#reg-account').addClass('red-edit-box');
		return false;
	}
	if($('#reg-username').val()=="")
	{
		alert("请输入用户名~");
		$('#reg-username').addClass('red-edit-box');
		return false;
	}
	if($('#reg-password').val()=="")
	{
		alert("请输入密码~");
		$('#reg-password').addClass('red-edit-box');
		return false;
	}
});

});

</script>

<link href="theme/default/images/favicon.ico" rel="shortcut icon" type="image/x-icon">

<!--[if IE 6]>
<script type="text/javascript">window.location.href = "./kill-ie6.html";</script>
<![endif]-->

</head>
<body class="bodystyle2">
<div class="login-outline">
<div class="login-outline2">
<div class="login-logo"><a href="http://www.twohome.net/"><img src="./theme/default/images/login_logo.png" width="392" height="150" /></a>
</div>

<div id="login-all" style="left:0px; position:static;">
<div id="login-login-outline">
    <form id="login-form" action="http://www.twohome.net/login" method="post">
    
    <div class="input-email focus" id="input-login-email">
    <span class="input-email-pic"></span>
    <label style="display: none; ">邮箱</label>
    <input class="input-email-name grayTips" id="login-account" type="text" name="account" value="请输入Email">
    <div class="tip" style="display:none"></div>
    </div>
    
    <div class="input-email" id="input-login-pwd">
    <span class="input-pwd-pic"></span>
    <label style="display: none; ">密码</label>
    <input class="input-email-name grayTips" id="login-password" type="password" name="password" value="">

    <div class="tip" style="display:none"></div>
    
    </div>    
    <input type="hidden" name="nextUrl" value="">
    <input type="hidden" name="lcallback" value="">
    <input type="hidden" name="persistent" value="1" checked="checked">
    
    <input type="submit" id="login-submit" class="login-input-button" value="登录">
    </form>
    
    <div id="login-help" class="login-forget">
    <a href="forget.html" id="forget-password"><span class="forget-a">忘记密码</span></a></div>
</div><!--login-login-outline-->
	<div class="change-login-reg"><img src="theme/default/images/button-register.jpg" width="153" height="44" id='switchReg'/><img src="theme/default/images/button-linkrenren.jpg" width="153" height="44" id='switchrenren'/> </div>



</div>



<div id="reg-all" style="display:none; position:absolute">
<div id="reg-login-outline">
    <form id="reg-form" action="http://www.twohome.net/login" method="post">
    
    <div class="input-email focus" id="input-reg-email">
    <span class="input-email-pic"></span>
    <label style="display: none; ">邮箱</label>
    <input class="input-email-name grayTips" id="reg-account" type="text" name="account" value="输入注册邮箱">
    <div class="tip" style="display:none"></div>
    </div>
    
    <div class="input-email focus" id="input-reg-email">
    <span class="input-id-pic"></span>
    <label style="display: none; ">用户名</label>
    <input class="input-email-name grayTips" id="reg-username" type="text" name="id" value="用户名">
    <div class="tip" style="display:none"></div>
    </div>

    <div class="input-email" id="input-reg-pwd">
    <span class="input-pwd-pic"></span>
    <label style="display: none; ">密码</label>
    <input class="input-email-name" id="reg-password" type="password" name="password" value="">
    <div class="tip" style="display:none"></div>
    </div>    
    
	<input type="submit" id="reg-submit" class="login-input-button" value="注册">
    </form>
</div><!--login-login-outline-->
    <div class="change-login-reg"><img src="theme/default/images/button-login.jpg" width="153" height="44" id='switchLog'/><img src="theme/default/images/button-linkrenren.jpg" width="153" height="44" id='switchrenren'/> </div>

    
</div>



</div><!--login-outline2-->
</div><!--login-outline-->
</body>
</html>
